// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './vuex/store'
import axios from 'axios'
import moment from 'moment'
import ElementUI from 'element-ui'

Vue.use(ElementUI)

//给Vue原型上绑定$axios
Vue.prototype.$axios = axios

//设置网路请求的IP和端口
axios.defaults.baseURL = "http://39.108.135.214:8899/"
axios.defaults.withCredentials = true

Vue.config.productionTip = false

//全局过滤器
Vue.filter('fmtDate',(input,formatString="YYYY-MM-DD HH:mm:sss")=>{
  return moment(input).format(formatString)
})

//导入样式文件
import 'element-ui/lib/theme-chalk/index.css'
import '../static/site/css/style.css'

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})
